#pragma once

#include "qsignalslotcenter_global.h"
#include <QUndoCommand>

namespace QSignalSlotCenter
{
	class QSIGNALSLOTCENTER_EXPORT CommandBase:public QUndoCommand
	{
	public:
		CommandBase(int action,QUndoCommand *parent = 0,const QString& text="");
		~CommandBase(void);
		virtual QString getImageFilePath() = 0;
		virtual QString getStatusTip() = 0;
		virtual QString getToolTip() = 0;
		virtual bool canRedo() = 0;
		virtual void redo() = 0;
		virtual void undo() = 0;
		int getAction() const
		{
			return _action;
		}
		inline QString getName()
		{
			return _commandName;
		};
		void setName(const QString& name);
	protected:
		bool _bIsSynchronizeCommand;
		QString _commandName;
		int _action;
	};
}